
module(name = "masorange_rules_helm", version = "1.6.0", bazel_compatibility = [">=6.0.0"])

bazel_dep(name = "aspect_bazel_lib", version = "2.3.0")

bazel_lib_toolchains = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")
use_repo(bazel_lib_toolchains, "yq_toolchains")

bazel_dep(name = "platforms", version = "0.0.7")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "rules_pkg", version = "0.9.1")

bazel_dep(name = "rules_oci", version = "1.6.0")
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True)

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci", dev_dependency = True)
oci.pull(
    name = "distroless_java",
    digest = "sha256:161a1d97d592b3f1919801578c3a47c8e932071168a96267698f4b669c24c76d",
    image = "gcr.io/distroless/java17",
)
use_repo(oci, "distroless_java")

toolchains = use_extension("@masorange_rules_helm//:extensions.bzl", "toolchains")
toolchains.install()

use_repo(toolchains, "helm_toolchains")
use_repo(toolchains, "sops_toolchains")
use_repo(toolchains, "kubectl_toolchains")
use_repo(toolchains, "gcloud_toolchains")

register_toolchains("@helm_toolchains//:all")
register_toolchains("@sops_toolchains//:all")
register_toolchains("@kubectl_toolchains//:all")
register_toolchains("@gcloud_toolchains//:all")

utils = use_extension("@masorange_rules_helm//:extensions.bzl", "utils", dev_dependency = True)
utils.pull(
    name = "nginx-chart",
    chart_name = "nginx",
    repo_url = "oci://localhost",
    version = "1.10.0"
)
use_repo(utils, "nginx-chart")
